package javaapplication7;

import java.util.Scanner;
/*
/**
* @(#)Fraccion.java
*
*
* @author yop
* @version 1.00 2011/10/16
*/


public class Fraccion {
private int num;
private int den;

public Fraccion() {
num=1;
den=2;
}

public Fraccion(int num,int den){
this.num=num;
this.den=den;
}

public Fraccion(Fraccion f){
this.num=f.num;
this.den=f.den;
}

public Fraccion Mult(Fraccion f){
Fraccion N= new Fraccion();
N.num=this.num*f.num;
N.den=this.den*f.den;
return N;
}

public Fraccion Suma(Fraccion f){
Fraccion T= new Fraccion();
T.num=(this.num*f.den)+(this.den*f.num)…
T.den=this.den*f.den;
return T;
}

public Fraccion Div(Fraccion f){
Fraccion Y= new Fraccion();
Y.num=this.num*f.den;
Y.den=this.den*f.num;
return Y;

}
public Fraccion Resta(Fraccion f){
Fraccion T= new Fraccion();
T.num=(this.num*f.den)-(this.den*f.num)…
T.den=this.den*f.den;
return T;
}

public void setNum(int x){
this.num=x;
}

public void setDen(int y){
this.den=y;
}

public int getNum(){
return num;
}

public int gtDen(){
return den;
}

public String toString(){
return ("numerador "+num+"/denominador "+den);
}


}